package com.sanben.rotation.controller;

import com.sanben.common.web.domain.Result;
import com.sanben.rotation.entity.RotationChart;
import com.sanben.rotation.service.IRotationChartService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author cyh
 * @description: 轮播图表 控制器
 * @date: 2020-08-11
 */
@RestController
@RequestMapping("/rotationChart")
@Api(tags = "轮播图表相关接口")
public class RotationChartController {

    @Autowired
	private IRotationChartService rotationChartService;

	@GetMapping("/home/list")
	@ApiOperation(value = "首页-轮播图列表")
	public Result<List<RotationChart>> getHomeList() {
		List<RotationChart> list = rotationChartService.getHomeList();
		return Result.data(list);
	}

}
